LBYTES

Syntax: LBYTES device_filename, start        
    or: LBYTES [device_]filename, start (Toolkit II only)
    or: LBYTES #channel, start  (SMS only)
Location: QL ROM, Toolkit II

This command loads a chunk of machine code (or data) stored on the given device under the specified filename and will report the error 'Not Found' (-7) if either the device or filename does not exist.  If Toolkit II is present, this command supports the default data device (see DATAD$).

If found, the chunk of machine code is loaded into the QL, starting at the specified start address. The code is loaded in one huge block, which means that loading is very quick. However, there is also no check on the type of file being loaded and therefore you should make sure that you know what you are doing.

Under SMS the third variant allows you to load the data from the specified channel which must be open to a file.  This allows for more efficient programs, so that you can perform various tests on the file beforehand (such as test its length and file type), whilst only opening a channel to the file once.

CROSS-REFERENCE:
Normally code loaded with LBYTES has been saved using SEXEC or SBYTES. FLEN allows you to find out the length of a file, FTYP its file type.
